package com.example.demo2.mapper;
import com.example.demo2.entity.CalHistory;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface CalHistoryMapper {
    @Insert("INSERT INTO cal_history (name, time) VALUES (#{name}, #{time})")
    void insertCalHistory(CalHistory calHistory);
    @Select("SELECT * FROM cal_history")
    List<CalHistory> getAllCalHistory();
}
